package com.java2007.zhangyu.restaurant.dao;

import com.java2007.zhangyu.restaurant.pojo.Order;

import java.sql.SQLException;
import java.util.List;

/**
 * @author zy
 * @Version
 * @date 2021/01/29
 */
public interface OrderDao {
    /**
     * 保存订单数据
     * @param order
     * @return
     * @throws SQLException
     */
    int save(Order order) throws SQLException;

    /**
     * 更新订单状态
     * @param orderId
     * @param status
     * @return
     * @throws SQLException
     */
    int updateOrderStatus(Long orderId, int status) throws SQLException;

    /**
     * 查询所有订单
     * @return
     * @throws SQLException
     */
    List<Order> queryAllOrder() throws SQLException;
}
